package com.lw.question12;

import java.util.Scanner;

/**
 * @author LW
 * @2020/9/18 10:21
 */
public class 菱形3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int n = scanner.nextInt();
        for (int i = 0; i < n; i++) {//n行
            for (int j = 0; j < n-i; j++) {//在一行之中打印空格和*
                System.out.print(" ");
            }
            for (int j = 0; j < 2*i-1; j++) {
                System.out.print("*");

            }
            System.out.println();
        }
        for (int i = n; i > 0; i--) {//n行
            for (int j = n; j > i; j--) {
                System.out.print(" ");
            }
            for (int j = 2*i-1; j > 0; j--) {
                System.out.print("*");
            }

            System.out.println();
        }

        System.out.println("===================================");
        for (int i = n; i > 0; i--) {
            for (int j = i; j > 0; j--) {
                System.out.print("*");
            }
            for (int j = 0; j < i; j++) {
                System.out.print("-");
            }

            System.out.println();
        }


    }
}
